package basic.arch.component.lock.config;

import basic.arch.component.lock.aop.annotation.Lock;

/**
 * 当前锁的配置，每一个锁对应一个配置（每一个锁的key都不同）
 * @author jannal
 */
public class CurrentLockSettings {
    
    /**
     * 当前锁的key
     */
    private String currenLockKey;
    
    /**
     * 本地锁的最大等待时间，默认为0表示不限制时间
     */
    private int localLockMaxWaitTime=0;
    
    /**
     * 分布式锁的最大等待时间
     */
    private int distributionLockMaxWaitTime=0;
    
    /**
     * 重试次数
     */
    private int tryTimes;

    /**
     * 分布式锁类型
     */
    private Lock.DisstributionLockType disstributionLockType ;

    public String getCurrenLockKey() {
        return currenLockKey;
    }

    public void setCurrenLockKey(String currenLockKey) {
        this.currenLockKey = currenLockKey;
    }

    public int getTryTimes() {
        return tryTimes;
    }

    public void setTryTimes(int tryTimes) {
        this.tryTimes = tryTimes;
    }

    public Lock.DisstributionLockType getDisstributionLockType() {
        return disstributionLockType;
    }

    public void setDisstributionLockType(Lock.DisstributionLockType disstributionLockType) {
        this.disstributionLockType = disstributionLockType;
    }

    public int getLocalLockMaxWaitTime() {
        return localLockMaxWaitTime;
    }

    public void setLocalLockMaxWaitTime(int lockMaxWaitTime) {
        this.localLockMaxWaitTime = lockMaxWaitTime;
    }

    public int getDistributionLockMaxWaitTime() {
        return distributionLockMaxWaitTime;
    }

    public void setDistributionLockMaxWaitTime(int distributionLockMaxWaitTime) {
        this.distributionLockMaxWaitTime = distributionLockMaxWaitTime;
    }

  
    
    

}
